package com.tc.zigbee.mt.income;

import com.tc.util.DataUtil;
import com.tc.zigbee.entity.ComplexDescriptor;

public class ComplexDescriptorResponse extends IncomeMessage {
	
	public ComplexDescriptor getComplexDescriptor() {
		return complexDescriptor;
	}
	byte status;
	ComplexDescriptor complexDescriptor = new ComplexDescriptor();
	public ComplexDescriptorResponse(byte[] command) {
		int i = 0;
		byte[] ad = new byte[2];
		ad[0] = command[i++];
		ad[1] = command[i++];
		complexDescriptor.srcAddr = DataUtil.shortValue(ad);
		status = command[i++];
		ad[0] = command[i++];
		ad[1] = command[i++];
		complexDescriptor.nwkAddr = DataUtil.shortValue(ad);
		complexDescriptor.complexLength = command[i++];
		complexDescriptor.complexDescriptor = new byte[this.complexDescriptor.complexLength];
		for(int j = 0; j < this.complexDescriptor.complexLength; j++)
			this.complexDescriptor.complexDescriptor[j] = command[i++];
	}

}
